﻿
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>附件属性设置</title>
<script language="JavaScript" src="../../Comm/JScript.js"></script>
    <script language="javascript" type="text/javascript" >
    <script language=javascript>
        /* ESC Key Down */
        function NoSubmit() {

        }
    </script>
    <base target=_self /> 
    <link href="../../Comm/Style/Table0.css" rel="stylesheet" type="text/css" />
    <link href="../../Comm/Style/Table0.css" rel="stylesheet" type="text/css" />
    <link href="../../Comm/Style/Tabs.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" src="../../Comm/JScript.js" type="text/javascript" ></script>
    <script type="text/javascript" src="../../Scripts/bootstrap/js/jquery.min.js"></script>
    <script type="text/javascript" src="../../Scripts/bootstrap/js/bootstrap.min.js"></script>
    <script src="../../Scripts/QueryString.js" type="text/javascript"></script>
    <script src="../../Scripts/config.js" type="text/javascript"></script>
    <script src="../../Comm/Gener.js" type="text/javascript"></script>

   <base target="_self" />
    <script  type="text/javascript">
        function Esc() {
            if (event.keyCode == 27)
                window.close();
            return true;
        }
        function WinOpen(url, name) {
            window.open(url, name, 'height=600, width=800, top=0, left=0, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no');
            //window.open(url, 'xx');
        }
        function TROver(ctrl) {
            ctrl.style.backgroundColor = 'LightSteelBlue';
        }

        function OpenCard() {
            var mypk = GetQueryString("MyPK");
            var url = '/WF/Comm/En.htm?EnName=BP.Sys.FrmAttachmentExt&PK=' + mypk;
            WinOpen(url, '_self');
            //alert(url);
            //window.location.href = url;
        }

        function TROut(ctrl) {
            ctrl.style.backgroundColor = 'white';
        }
        /*隐藏与显示.*/
        function ShowHidden(ctrlID) {

            var ctrl = document.getElementById(ctrlID);
            if (ctrl.style.display == "block") {
                ctrl.style.display = 'none';
            } else {
                ctrl.style.display = 'block';
            }
        }

        $(function Attachment_Init() {
            var FK_MapData = GetQueryString("FK_MapData");
            var Ath = GetQueryString("Ath");
            var MyPK = GetQueryString("MyPK");
            $.ajax({
                type: 'POST',
                async: true,
                url: Handler + "?DoType=Attachment_Init&FK_MapData=" + FK_MapData + "&Ath=" + Ath + "&MyPK=" + MyPK,
                dataType: 'html',
                success: function (data) {
                    data = JSON.parse(data);

                    //给整个界面的元素批量赋值.
                    GenerFullAllCtrlsVal(data);
                    if (data.NoOfObj != null) {
                        $("#TB_NoOfObj").attr('disabled', true);
                    }

                    // alert("初始化成功");
                },
                error: function (data) {
                    alert(初始化失败);
                }

            });
        });

        function Save() {
            var CheckBoxIDs = GenerCheckIDs(); //获得所有的checkBox ID传入到后台去,用于解决checkbox控件，在没有被选择的时候，没有值的问题。
            var frmData = $("#cc").serialize();
            var Ath = GetQueryString("Ath");
            $.ajax({
                data: frmData,
                type: 'post',
                async: true,
                url: Handler + "?DoType=Attachment_Save&FK_MapData=" + GetQueryString("FK_MapData") + "&Ath=" + Ath + "&CheckBoxIDs=" + CheckBoxIDs + "m=" + Math.random(),
                dataType: 'html',
                success: function (data) {

                    if (data.indexOf('err@') == 0) {
                        alert(data);
                        return;
                    }


                    alert(data);
                    return;
                  //  window.close();
                }
            });
        }
        function Delete() {

            var Ath = GetQueryString("Ath");
            var mypk = GetQueryString("FK_MapData") + "_" + Ath;

           // alert("mypk======" + mypk);

            $.ajax({
                type: 'post',
                async: true,
                url: Handler + "?DoType=Attachment_Delete&FK_MapData=" + GetQueryString("FK_MapData") + "&MyPK=" + mypk + "&Ath=" + Ath + "m=" + Math.random(),
                dataType: 'html',
                success: function (data) {

                    if (data.indexOf('err@') == 0) {
                        Attachment_Init();
                        alert(data);
                        return;
                    }

                   alert(data);
                   window.close();
                }
            });   
        }
        </script>
</head>
<body onkeypress="Esc();" topmargin="0" leftmargin="0"   style="font-size:smaller">
    <form   id="cc">
    <div>
        
<center>
    <table class='Table' cellpadding='2' cellspacing='2'>
<caption >附件属性设置 - <a href='javascript:OpenCard()'  >卡片设置</a> </caption>
<tr>
<td class='Idx' >0</td>
<th class='Title' colspan="3" =true >基本属性</th>
</tr>
<tr>
<td class='Idx' >1</td>
<td   >编号</td>
<td ><input name="TB_NoOfObj" type="text"  id="TB_NoOfObj" /></td>
<td   >标示号只能英文字母数字或下滑线.</td>
</tr>
<tr>
<td class='Idx' >2</td>
<td   >名称</td>
<td ><input name="TB_Name" type="text" id="TB_Name" /></td>
<td   >附件的中文名称.</td>
</tr>
<tr>
<td class='Idx' >3</td>
<td   >文件格式</td>
<td ><input name="TB_Exts" type="text" id="TB_Exts" /></td>
<td   >实例:doc,docx,xls,多种格式用逗号分开.</td>
</tr>
<tr>
<td class='Idx' >4</td>
<td   >文件数据存储方式</td>
<td ><select name="DDL_SaveWay" id="DDL_SaveWay">
	<option  value="0">按文件方式保存</option>
	<option value="1">保存到数据库</option>
    <option value="2">保存到FTP</option>
</select></td>
<td   >上传的附件如何保存?</td>
</tr>
<tr>
<td class='Idx' >5</td>
<td >保存到</td>
<td colspan="2" >文件存储格式才有意义<BR><input name="TB_SaveTo" type="text" size="60" id="TB_SaveTo" /></td>
</tr>
<tr>
<td class='Idx' >6</td>
<td   >类别</td>
<td   colspan="2"  ><input name="TB_Sort" type="text" size="60" id="TB_Sort" /></td>
</tr>
<tr>
<td class='Idx' >7</td>
<td colspan="3" >帮助:类别可以为空,设置的格式为:列头显示名称@类别名1,类别名2,类别名3(列头显示名称@ :可以不写，默认为：类别)<br>您还可以设置一个SQL语句:比如:SELECT xxx FORM MyTable 返回1列数据源. </td>
</tr>
<tr>
<td class='Idx' >8</td>
<td   >完整性校验</td>
<td   colspan="2"  ><select name="DDL_UploadFileNumCheck" id="DDL_UploadFileNumCheck">
	<option  value="0">不控制</option>
	<option value="1">上传附件个数不能为0</option>
	<option value="2">每个类别下面的个数不能为0</option>

</select></td>
</tr>
<tr>
<td class='Idx' >9</td>
<td   >高度</td>
<td   colspan="1"  ><input name="TB_H" type="text" maxlength="14" size="12" id="TB_H" class="TBNum" OnKeyPress="return VirtyNum(this);" /></td>
<td   >对傻瓜表单有效</td>
</tr>
<tr>
<td class='Idx' >10</td>
<td   >宽度</td>
<td   colspan="1"  ><input name="TB_W" type="text" maxlength="14" size="60" id="TB_W" class="TBNum" OnKeyPress="return VirtyNum(this);" /></td>
<td   >对傻瓜表单有效</td>
</tr>
<tr>
<td class='Idx' >11</td>
<td   >自动控制</td>
<td   colspan="2"  ><input id="CB_IsAutoSize" type="checkbox" name="CB_IsAutoSize" /><label for="CB_IsAutoSize">自动控制高度与宽度(对傻瓜表单有效)</label></td>
</tr>
<tr>
<td class='Idx' >12</td>
<td ><input id="CB_IsNote" type="checkbox" name="CB_IsNote" /><label for="CB_IsNote">是否增加备注列</label></td>
<td ><input id="CB_IsShowTitle" type="checkbox" name="CB_IsShowTitle" /><label for="CB_IsShowTitle">是否显示标题列</label></td>
<td   >&nbsp;</td>
</tr>
<tr>
<td class='Idx' >13</td>
<td   colspan="3"  ><input id="CB_IsVisable" type="checkbox" name="CB_IsVisable"/><label for="CB_IsVisable">是否可见(不打勾就隐藏,隐藏后就显示不到表单上,可以显示在组件里.)</label></td>
</tr>
<tr>
<td class='Idx' >14</td>
<td   >展现方式</td>
<td   colspan="2"  ><select name="DDL_FileShowWay" id="DDL_FileShowWay">
	<option  value="0">Table方式</option>
	<option value="1">图片轮播方式</option>
	<option value="2">自由模式</option>

</select></td>
</tr>
<tr>
<td class='Idx' >15</td>
<th class='Title' colspan="3" =true >权限控制<div style='float:right' ><a href='http://ccform.mydoc.io' target=_blank><img src='/WF/Img/Help.gif'>帮助</a></div></th>
</tr>
<tr>
<td class='Idx' >16</td>
<td ><input id="CB_IsDownload" type="checkbox" name="CB_IsDownload" /><label for="CB_IsDownload">是否可下载</label></td>
<td ><select name="DDL_DeleteWay" id="DDL_DeleteWay">
	<option  value="0">不能删除</option>
	<option value="1">删除所有</option>
	<option value="2">只能删除自己上传的</option>

</select></td>
<td ><input id="CB_IsUpload" type="checkbox" name="CB_IsUpload"/><label for="CB_IsUpload">是否可上传</label></td>
</tr>
<tr>
<td class='Idx' >17</td>
<td ><input id="CB_IsOrder" type="checkbox" name="CB_IsOrder" /><label for="CB_IsOrder">是否可以排序</label></td>
<td   >使用上传控件方式</td>
<td ><select name="DDL_UploadCtrl" id="DDL_UploadCtrl">
	<option  value="0">批量上传</option>
	<option value="1">普通上传</option>

</select></td>
</tr>
<tr id="DDL_Tr1">
<td class='Idx' >18</td>
<td   >数据显示控制方式</td>
<td   colspan="2"  ><select name="DDL_CtrlWay" id="DDL_CtrlWay">
	<option  value="0">按主键</option>
	<option value="1">FID</option>
	<option value="2">ParentWorkID</option>
	<option value="3">仅可以查看自己上传数据</option>
</select></td>
</tr>
<tr id="DDL_Tr2">
<td class='Idx' >19</td>
<td   >子线程节点控制(对节点表单有效)</td>
<td   colspan="2"  ><input id="CB_IsToHeLiuHZ" type="checkbox" name="CB_IsToHeLiuHZ" /><label for="CB_IsToHeLiuHZ">该附件是否要汇总到合流节点上去？(对子线程节点有效)</label></td>
</tr>
<tr id="DDL_Tr3">
<td class='Idx' >20</td>
<td   >合流节点控制(对节点表单有效)</td>
<td   colspan="2"  ><input id="CB_IsHeLiuHuiZong" type="checkbox" name="CB_IsHeLiuHuiZong" /><label for="CB_IsHeLiuHuiZong">是否是合流节点的汇总附件组件？(对合流节点有效)</label></td>
</tr>

<tr id="DDL_Tr4">
<td class='Idx' >21</td>
<td   >数据上传控制方式</td>
<td   colspan="2"  ><select name="DDL_AthUploadWay" id="DDL_AthUploadWay">
	<option  value="0">继承模式</option>
	<option value="1">协作模式</option>

</select></td>
</tr>

<tr class=TR1 >
<td class='Idx' >22</td>
<th class='Title' colspan="3" =true >WebOffice控制方式(如果上传的是excel word附件，在打开的时候对其的控制).</th>
</tr>
<tr>
<td class='Idx' >23</td>
<td ><input id="CBPara_IsWoEnableWF" type="checkbox" name="CBPara_IsWoEnableWF" /><label for="CB_IsWoEnableWF">是否启用weboffice？</label></td>
<td ><input id="CBPara_IsWoEnableSave" type="checkbox" name="CBPara_IsWoEnableSave" /><label for="CB_IsWoEnableSave">是否启用保存？</label></td>
<td ><input id="CBPara_IsWoEnableReadonly" type="checkbox" name="CBPara_IsWoEnableReadonly" /><label for="CB_IsWoEnableReadonly">是否只读？</label></td>
</tr>
<tr>
<td class='Idx' >24</td>
<td ><input id="CBPara_IsWoEnableRevise" type="checkbox" name="CBPara_IsWoEnableRevise" /><label for="CB_IsWoEnableRevise">是否启用修订？</label></td>
<td ><input id="CBPara_IsWoEnableViewKeepMark" type="checkbox" name="CBPara_IsWoEnableViewKeepMark" /><label for="CB_IsWoEnableViewKeepMark">是否查看用户留痕？</label></td>
<td ><input id="CBPara_IsWoEnablePrint" type="checkbox" name="CBPara_IsWoEnablePrint" /><label for="CB_IsWoEnablePrint">是否打印？</label></td>
</tr>
<tr>
<td class='Idx' >25</td>
<td ><input id="CBPara_IsWoEnableOver" type="checkbox" name="CBPara_IsWoEnableOver" /><label for="CB_IsWoEnableOver">是否启用套红？</label></td>
<td ><input id="CBPara_IsWoEnableSeal" type="checkbox" name="CBPara_IsWoEnableSeal" /><label for="CB_IsWoEnableSeal">是否启用签章？</label></td>
<td ><input id="CBPara_IsWoEnableTemplete" type="checkbox" name="CBPara_IsWoEnableTemplete" /><label for="CB_IsWoEnableTemplete">是否启用模板文件？</label></td>
</tr>
<tr>
<td class='Idx' >26</td>
<td ><input id="CBPara_IsWoEnableCheck" type="checkbox" name="CBPara_IsWoEnableCheck" /><label for="CB_IsWoEnableCheck">是否记录节点信息？</label></td>
<td ><input id="CBPara_IsWoEnableInsertFlow" type="checkbox" name="CBPara_IsWoEnableInsertFlow" /><label for="CB_IsWoEnableInsertFlow">是否启用插入流程？</label></td>
<td ><input id="CBPara_IsWoEnableInsertFengXian" type="checkbox" name="CBPara_IsWoEnableInsertFengXian" /><label for="CB_IsWoEnableInsertFengXian">是否启用插入风险点？</label></td>
</tr>
<tr>
<td class='Idx' >27</td>
<td ><input id="CBPara_IsWoEnableMarks" type="checkbox" name="CBPara_IsWoEnableMarks" /><label for="CB_IsWoEnableMarks">是否进入留痕模式？</label></td>
<td ><input id="CBPara_IsWoEnableDown" type="checkbox" name="CBPara_IsWoEnableDown" /><label for="CB_IsWoEnableDown">是否启用下载？</label></td>
<td   >&nbsp;</td>
</tr>
</tr>
<tr class=TR1 >
<td class='Idx' >28</td>
<th class='Title' colspan="3" =true >快捷键生成规则.</th>
</tr>
<tr>
<td class='Idx' >29</td>
<td   colspan="3"  ><input id="CBPara_FastKeyIsEnable" type="checkbox" name="CBPara_FastKeyIsEnable" /><label for="CB_FastKeyIsEnable">是否启用生成快捷键？(启用就会按照规则生成放在附件的同一个目录里面)</label></td>
</tr>
<tr>
<td class='Idx' >30</td>
<td   colspan="3"  ><input name="TB_FastKeyGenerRole" type="text" size="30" id="TB_FastKeyGenerRole" /></td>
</tr>
<tr>
<td class='Idx' >31</td>
<td colspan="3" >格式:*FiledName.*OID</td>
</tr>
<tr>
<td class='Idx' >32</td>
<td   >&nbsp;</td>
<td ><input type="button" name="Btn_Save" value="保存" id="Btn_Save" onclick="Save();" class="Btn" /></td>
<td ><input type="button" name="Btn_Delete" value=" 删除  " id="Btn_Delete" onclick="Delete();" class="Btn" /></td>
<td >&nbsp;</td>
</tr></Table>
    </center>

    </div>
    </form>
</body>
</html>
